package com.hao.user.app.model.dto.user;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author haoge
 * @version 1.0
 * @date 2023/5/21 9:46
 */
@Data
public class UserAddRequest implements Serializable {

    @NotBlank (message = "账号不能为空")
    @Length (min = 4,message = "用户账号长度过短")
    @NotNull (message = "账号不能为空")
    private String userAccount;

    @NotNull (message = "性别不能为空")
    private Integer gender;

    @NotBlank(message = "密码不能为空")
    @Length(min = 8,message = "密码过短")
    @NotNull(message = "密码不能为空")
    private String password;

    @NotBlank(message = "请再次输入密码")
    @Length(min = 8,message = "密码过短")
    @NotNull(message = "请再次输入密码")
    private String checkPassword;

    private static final long serialVersionUID = 1L;
}
